﻿@namespace CyssBlazor.Shared.Components

@if (IsShow)
{
    @ChildContent
}

@code {

    private bool IsShow { set; get; }

    [Parameter]
    public RenderFragment ChildContent { get; set; }


    protected override async Task OnAfterRenderAsync(bool firstRender)
    {
        if (firstRender)
        {
            Show();
        }
    }

    private void Show()
    {
        Task.Run(async () =>
        {
            IsShow = true;
            await InvokeAsync(StateHasChanged);

        });
    }
}
